"""
 Flash OS Routines (Automagically Generated)
 Copyright (c) 2017-2017 ARM Limited
"""

flash_algo = {
    'load_address' : 0x20000000,
    'instructions' : [
        0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
        0x49D548D4, 0x1F086008, 0xF0406800, 0x1F097080, 0xBF006008, 0x1F0048D0, 0xF0006800, 0x28007000,
        0x48CDD0F8, 0x68001D00, 0x0003F020, 0x1D0949CA, 0x46086008, 0xF0406800, 0x60080002, 0x48C6BF00,
        0x68001D00, 0x000CF000, 0xD1F82808, 0x48C24770, 0x68001D00, 0x0003F020, 0x1D0949BF, 0x48BE6008,
        0x68001F00, 0x7080F020, 0x1F0949BB, 0x48BB6008, 0x60081D09, 0xB5104770, 0x460C4603, 0x1D0048B6,
        0xF0206800, 0x49B400F0, 0x60081D09, 0x68004608, 0x0080F040, 0x46086008, 0xF0206800, 0x600800F0,
        0x688048AF, 0x5080F440, 0x608849AD, 0xFFA8F7FF, 0x49AD48AC, 0x48AD6008, 0x48AA6008, 0x314049AA,
        0x48AA6008, 0xF2456008, 0x49A95055, 0x20066008, 0xF6406048, 0x608870FF, 0xBD102000, 0x4602B500,
        0x6880489F, 0x5080F420, 0x6088499D, 0xFFAFF7FF, 0x300C489D, 0xF0406800, 0x499B0080, 0x6008310C,
        0x304C4899, 0xF0406800, 0x49970080, 0x6008314C, 0xBD002000, 0x300C4894, 0xF0406800, 0x49920044,
        0x6008310C, 0x4890BF00, 0x68003008, 0x0001F000, 0xD1F82800, 0x300C488C, 0xF0206800, 0x498A0004,
        0x6008310C, 0x304C4888, 0xF0406800, 0x49860044, 0x6008314C, 0x4884BF00, 0x68003048, 0x0001F000,
        0xD1F82800, 0x304C4880, 0xF0206800, 0x497E0004, 0x6008314C, 0x47702000, 0xF1B14601, 0xD3015F00,
        0x47702000, 0x20AAF64A, 0x60104A79, 0x6F02F1B1, 0x4875D22C, 0x6800300C, 0x0002F040, 0x320C4A72,
        0x1D106010, 0x1F006001, 0xF0406800, 0x60100040, 0xF64AE003, 0x4A6E20AA, 0x486B6010, 0x68003008,
        0x0001F000, 0xD1F42800, 0x300C4867, 0xF0206800, 0x4A650002, 0x6010320C, 0x68001F10, 0x0014F000,
        0x2014B388, 0x60101F12, 0xE7CA2001, 0x304C485E, 0xF0406800, 0x4A5C0002, 0x6010324C, 0x60011D10,
        0x68001F00, 0x0040F040, 0xE0036010, 0x20AAF64A, 0x60104A57, 0x30484854, 0xF0006800, 0x28000001,
        0x4851D1F4, 0x6800304C, 0x0002F020, 0x324C4A4E, 0x1F106010, 0xF0006800, 0xB1200014, 0x1F122014,
        0x20016010, 0xE7FFE79D, 0xE79A2000, 0x4603B510, 0xF0201C48, 0xF1B30101, 0xD3095F00, 0x8810E004,
        0x1C9B8018, 0x1E891C92, 0xD1F82900, 0xBD102000, 0x6F02F1B3, 0x483CD236, 0x6800300C, 0x0001F040,
        0x340C4C39, 0xE0226020, 0x80188810, 0x4836BF00, 0x68003008, 0x0001F000, 0xD1F82800, 0x20AAF64A,
        0x60204C33, 0x30084830, 0xF0006800, 0xB1580014, 0x4C2D2014, 0x60203408, 0x68001D20, 0x0001F020,
        0x60201D24, 0xE7D22001, 0x1C9B1E89, 0x29001C92, 0x4825D1DA, 0x6800300C, 0x0001F020, 0x340C4C22,
        0xE0356020, 0x304C4820, 0xF0406800, 0x4C1E0001, 0x6020344C, 0x8810E022, 0xBF008018, 0x3048481A,
        0xF0006800, 0x28000001, 0xF64AD1F8, 0x4C1820AA, 0x48156020, 0x68003048, 0x0014F000, 0x2014B158,
        0x34484C11, 0x1D206020, 0xF0206800, 0x1D240001, 0x20016020, 0x1E89E79B, 0x1C921C9B, 0xD1DA2900,
        0x304C4809, 0xF0206800, 0x4C070001, 0x6020344C, 0xE78C2000, 0x00031801, 0x40023804, 0x00033002,
        0xE0042000, 0x45670123, 0x40023C04, 0xCDEF89AB, 0x40003000, 0x00000000
    ],

    'pc_Init'            : 0x20000097,
    'pc_UnInit'          : 0x200000FD,
    'pc_EraseSector'     : 0x20000199,
    'pc_ProgramPage'     : 0x2000026D,
    'pc_Verify'          : 0x12000001F,
    'pc_EraseChip'       : 0x20000135,
    'pc_BlankCheck'      : 0x12000001F,
    'pc_Read'            : 0x12000001F,
    
    'static_base'        : 0x20000394,
    'begin_data'         : 0x20000398,
    'begin_stack'        : 0x20000B98,

    'analyzer_supported' : False,

    # Relative region addresses and sizes
    'ro_start'           : 0x00000000,
    'ro_size'            : 0x00000374,
    'rw_start'           : 0x00000374,
    'rw_size'            : 0x00000004,
    'zi_start'           : 0x00000378,
    'zi_size'            : 0x00000000,

    # Flash information
    'flash_start'        : 0x08000000,
    'flash_size'         : 0x003F0000,
    'flash_page_size'    : 0x00000400,
    'sector_sizes': (
        (0x00000, 0x01000),
    )
}
